package com.gzbit.caculater.ui;


import com.gzbit.caculater.bll.Ioperation;
import com.gzbit.caculater.bll.Operation;

import java.util.*;

public class Test {
    public static void main(String[] args) throws Exception {
        int numberA,numberB,result;
        String oprType;
        Scanner scanner = new Scanner(System.in);
        numberA = scanner.nextInt();
            numberB = scanner.nextInt();
            oprType = scanner.next();
        Ioperation opr =null;
        switch(oprType){
            case"+":
                opr = new AddOperation();
                break;
            case"-":
                opr = new SubOperation();
                break;
            default:
                throw new Exception("输入的运算符错误");
        }
        opr.setValue(numberA,numberB);
        result=opr.getresult();
        System.out.print(result);
    }
}

